import "bootstrap/dist/css/bootstrap.css"
import "@scss/header.scss"
import "@scss/examResult.scss"
import $ from "jquery"
import "bootstrap/dist/js/bootstrap.js"
import http from "../utils/request.js";
import {renderName} from "./render.js";

(async function () {

    renderName();
    let totleScore = sessionStorage.getItem("totleScore");
    let allScore = sessionStorage.getItem("allScore");
    let tests_id = sessionStorage.getItem("testId");
    let user_id = localStorage.getItem("userId");
    let { test } = await http({ url: "/api/beginExam/getExamUser", type: "post", data: { tests_id, user_id } });

    $(".result h4").html(`${test[0].Title}${test[0].KnowledgePointId.KnowledgePoint}${test[0].TypeId.examType}`);

    $(".result h5").html(`<span>${totleScore}</span>分`);
    $(".result-score .left p:first-child").html(allScore);
    
})();